Optimal. Leaf size=154 \[ -\frac {B \text {ArcTan}\left (1-\sqrt {2} \sqrt {\cot (c+d x)}\right )}{\sqrt {2} d}+\frac {B \text {ArcTan}\left (1+\sqrt {2} \sqrt {\cot (c+d x)}\right )}{\sqrt {2} d}+\frac {2 B}{d \sqrt {\cot (c+d x)}}+\frac {B \log \left (1-\sqrt {2} \sqrt {\cot (c+d x)}+\cot (c+d x)\right )}{2 \sqrt {2} d}-\frac {B \log \left (1+\sqrt {2} \sqrt {\cot (c+d x)}+\cot (c+d x)\right )}{2 \sqrt {2} d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.07, antiderivative size = 154, normalized size of antiderivative = 1.00, number of steps
used = 13, number of rules used = 10, integrand size = 36, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.278, Rules used = {21, 3555,
3557, 335, 303, 1176, 631, 210, 1179, 642} \begin {gather*} -\frac {B \text {ArcTan}\left (1-\sqrt {2} \sqrt {\cot (c+d x)}\right )}{\sqrt {2} d}+\frac {B \text {ArcTan}\left (\sqrt {2} \sqrt {\cot (c+d x)}+1\right )}{\sqrt {2} d}+\frac {2 B}{d \sqrt {\cot (c+d x)}}+\frac {B \log \left (\cot (c+d x)-\sqrt {2} \sqrt {\cot (c+d x)}+1\right )}{2 \sqrt {2} d}-\frac {B \log \left (\cot (c+d x)+\sqrt {2} \sqrt {\cot (c+d x)}+1\right )}{2 \sqrt {2} d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 21
Rule 210
Rule 303
Rule 335
Rule 631
Rule 642
Rule 1176
Rule 1179
Rule 3555
Rule 3557
Rubi steps
\begin {align*} \int \frac {a B+b B \tan (c+d x)}{\cot ^{\frac {3}{2}}(c+d x) (a+b \tan (c+d x))} \, dx &=B \int \frac {1}{\cot ^{\frac {3}{2}}(c+d x)} \, dx\\ &=\frac {2 B}{d \sqrt {\cot (c+d x)}}-B \int \sqrt {\cot (c+d x)} \, dx\\ &=\frac {2 B}{d \sqrt {\cot (c+d x)}}+\frac {B \text {Subst}\left (\int \frac {\sqrt {x}}{1+x^2} \, dx,x,\cot (c+d x)\right )}{d}\\ &=\frac {2 B}{d \sqrt {\cot (c+d x)}}+\frac {(2 B) \text {Subst}\left (\int \frac {x^2}{1+x^4} \, dx,x,\sqrt {\cot (c+d x)}\right )}{d}\\ &=\frac {2 B}{d \sqrt {\cot (c+d x)}}-\frac {B \text {Subst}\left (\int \frac {1-x^2}{1+x^4} \, dx,x,\sqrt {\cot (c+d x)}\right )}{d}+\frac {B \text {Subst}\left (\int \frac {1+x^2}{1+x^4} \, dx,x,\sqrt {\cot (c+d x)}\right )}{d}\\ &=\frac {2 B}{d \sqrt {\cot (c+d x)}}+\frac {B \text {Subst}\left (\int \frac {1}{1-\sqrt {2} x+x^2} \, dx,x,\sqrt {\cot (c+d x)}\right )}{2 d}+\frac {B \text {Subst}\left (\int \frac {1}{1+\sqrt {2} x+x^2} \, dx,x,\sqrt {\cot (c+d x)}\right )}{2 d}+\frac {B \text {Subst}\left (\int \frac {\sqrt {2}+2 x}{-1-\sqrt {2} x-x^2} \, dx,x,\sqrt {\cot (c+d x)}\right )}{2 \sqrt {2} d}+\frac {B \text {Subst}\left (\int \frac {\sqrt {2}-2 x}{-1+\sqrt {2} x-x^2} \, dx,x,\sqrt {\cot (c+d x)}\right )}{2 \sqrt {2} d}\\ &=\frac {2 B}{d \sqrt {\cot (c+d x)}}+\frac {B \log \left (1-\sqrt {2} \sqrt {\cot (c+d x)}+\cot (c+d x)\right )}{2 \sqrt {2} d}-\frac {B \log \left (1+\sqrt {2} \sqrt {\cot (c+d x)}+\cot (c+d x)\right )}{2 \sqrt {2} d}+\frac {B \text {Subst}\left (\int \frac {1}{-1-x^2} \, dx,x,1-\sqrt {2} \sqrt {\cot (c+d x)}\right )}{\sqrt {2} d}-\frac {B \text {Subst}\left (\int \frac {1}{-1-x^2} \, dx,x,1+\sqrt {2} \sqrt {\cot (c+d x)}\right )}{\sqrt {2} d}\\ &=-\frac {B \tan ^{-1}\left (1-\sqrt {2} \sqrt {\cot (c+d x)}\right )}{\sqrt {2} d}+\frac {B \tan ^{-1}\left (1+\sqrt {2} \sqrt {\cot (c+d x)}\right )}{\sqrt {2} d}+\frac {2 B}{d \sqrt {\cot (c+d x)}}+\frac {B \log \left (1-\sqrt {2} \sqrt {\cot (c+d x)}+\cot (c+d x)\right )}{2 \sqrt {2} d}-\frac {B \log \left (1+\sqrt {2} \sqrt {\cot (c+d x)}+\cot (c+d x)\right )}{2 \sqrt {2} d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains higher order function than in optimal. Order 5 vs. order 3 in
optimal.
time = 0.03, size = 34, normalized size = 0.22 \begin {gather*} \frac {2 B \, _2F_1\left (-\frac {1}{4},1;\frac {3}{4};-\cot ^2(c+d x)\right )}{d \sqrt {\cot (c+d x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 4 vs. order
3.
time = 49.61, size = 658, normalized size = 4.27
method | result | size |
default | \(\frac {B \sqrt {2}\, \left (i \sin \left (d x +c \right ) \EllipticPi \left (\sqrt {-\frac {\cos \left (d x +c \right )-1-\sin \left (d x +c \right )}{\sin \left (d x +c \right )}}, \frac {1}{2}-\frac {i}{2}, \frac {\sqrt {2}}{2}\right ) \sqrt {\frac {-1+\cos \left (d x +c \right )}{\sin \left (d x +c \right )}}\, \sqrt {\frac {\cos \left (d x +c \right )-1+\sin \left (d x +c \right )}{\sin \left (d x +c \right )}}\, \sqrt {-\frac {\cos \left (d x +c \right )-1-\sin \left (d x +c \right )}{\sin \left (d x +c \right )}}-i \sin \left (d x +c \right ) \EllipticPi \left (\sqrt {-\frac {\cos \left (d x +c \right )-1-\sin \left (d x +c \right )}{\sin \left (d x +c \right )}}, \frac {1}{2}+\frac {i}{2}, \frac {\sqrt {2}}{2}\right ) \sqrt {\frac {-1+\cos \left (d x +c \right )}{\sin \left (d x +c \right )}}\, \sqrt {\frac {\cos \left (d x +c \right )-1+\sin \left (d x +c \right )}{\sin \left (d x +c \right )}}\, \sqrt {-\frac {\cos \left (d x +c \right )-1-\sin \left (d x +c \right )}{\sin \left (d x +c \right )}}+\sin \left (d x +c \right ) \EllipticPi \left (\sqrt {-\frac {\cos \left (d x +c \right )-1-\sin \left (d x +c \right )}{\sin \left (d x +c \right )}}, \frac {1}{2}-\frac {i}{2}, \frac {\sqrt {2}}{2}\right ) \sqrt {\frac {-1+\cos \left (d x +c \right )}{\sin \left (d x +c \right )}}\, \sqrt {\frac {\cos \left (d x +c \right )-1+\sin \left (d x +c \right )}{\sin \left (d x +c \right )}}\, \sqrt {-\frac {\cos \left (d x +c \right )-1-\sin \left (d x +c \right )}{\sin \left (d x +c \right )}}+\sin \left (d x +c \right ) \EllipticPi \left (\sqrt {-\frac {\cos \left (d x +c \right )-1-\sin \left (d x +c \right )}{\sin \left (d x +c \right )}}, \frac {1}{2}+\frac {i}{2}, \frac {\sqrt {2}}{2}\right ) \sqrt {\frac {-1+\cos \left (d x +c \right )}{\sin \left (d x +c \right )}}\, \sqrt {\frac {\cos \left (d x +c \right )-1+\sin \left (d x +c \right )}{\sin \left (d x +c \right )}}\, \sqrt {-\frac {\cos \left (d x +c \right )-1-\sin \left (d x +c \right )}{\sin \left (d x +c \right )}}-2 \sin \left (d x +c \right ) \EllipticF \left (\sqrt {-\frac {\cos \left (d x +c \right )-1-\sin \left (d x +c \right )}{\sin \left (d x +c \right )}}, \frac {\sqrt {2}}{2}\right ) \sqrt {\frac {-1+\cos \left (d x +c \right )}{\sin \left (d x +c \right )}}\, \sqrt {\frac {\cos \left (d x +c \right )-1+\sin \left (d x +c \right )}{\sin \left (d x +c \right )}}\, \sqrt {-\frac {\cos \left (d x +c \right )-1-\sin \left (d x +c \right )}{\sin \left (d x +c \right )}}+2 \sqrt {2}\, \cos \left (d x +c \right )-2 \sqrt {2}\right ) \left (-1+\cos \left (d x +c \right )\right ) \cos \left (d x +c \right ) \left (\cos \left (d x +c \right )+1\right )^{2}}{2 d \left (\frac {\cos \left (d x +c \right )}{\sin \left (d x +c \right )}\right )^{\frac {3}{2}} \sin \left (d x +c \right )^{5}}\) | \(658\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.55, size = 126, normalized size = 0.82 \begin {gather*} \frac {{\left (2 \, \sqrt {2} \arctan \left (\frac {1}{2} \, \sqrt {2} {\left (\sqrt {2} + \frac {2}{\sqrt {\tan \left (d x + c\right )}}\right )}\right ) + 2 \, \sqrt {2} \arctan \left (-\frac {1}{2} \, \sqrt {2} {\left (\sqrt {2} - \frac {2}{\sqrt {\tan \left (d x + c\right )}}\right )}\right ) - \sqrt {2} \log \left (\frac {\sqrt {2}}{\sqrt {\tan \left (d x + c\right )}} + \frac {1}{\tan \left (d x + c\right )} + 1\right ) + \sqrt {2} \log \left (-\frac {\sqrt {2}}{\sqrt {\tan \left (d x + c\right )}} + \frac {1}{\tan \left (d x + c\right )} + 1\right )\right )} B + 8 \, B \sqrt {\tan \left (d x + c\right )}}{4 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: TypeError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} B \int \frac {1}{\cot ^{\frac {3}{2}}{\left (c + d x \right )}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 8.98, size = 64, normalized size = 0.42 \begin {gather*} \frac {2\,B}{d\,\sqrt {\frac {1}{\mathrm {tan}\left (c+d\,x\right )}}}+\frac {{\left (-1\right )}^{1/4}\,B\,\mathrm {atan}\left ({\left (-1\right )}^{1/4}\,\sqrt {\frac {1}{\mathrm {tan}\left (c+d\,x\right )}}\right )}{d}-\frac {{\left (-1\right )}^{1/4}\,B\,\mathrm {atanh}\left ({\left (-1\right )}^{1/4}\,\sqrt {\frac {1}{\mathrm {tan}\left (c+d\,x\right )}}\right )}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________